﻿<?xml version="1.0" encoding="utf-8" ?> 
<Mapping  xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

	<Entity type="Demo:Company" table="Companies" discriminator="CompanyType" discriminator-value="Demo:Company">
		<Id field="CompanyID">
			<Generator name="native">
				<Property name="dbType">Int32</Property>
			</Generator>
		</Id>
		<Attribute name="Name" type="System.String" field="Name" db-type="String"></Attribute>
		<Attribute name="SiretNb" type="System.Int32" field="SiretNb" db-type="String"></Attribute>
	</Entity>
	
	<Entity type="Demo:Factory" table="Companies" discriminator="CompanyType" discriminator-value="Demo:Factory" copyNode="Demo:Company">
		<Id field="CompanyID">
			<Generator name="native">
				<Property name="dbType">Int32</Property>
			</Generator>
		</Id>
		<Attribute name="City" type="System.String" field="City" db-type="String"></Attribute>
	</Entity>
	
	<Entity type="Demo:CarFactory" table="Companies" discriminator="CompanyType" discriminator-value="Demo:CarFactory" copyNode="Demo:Factory">
		<Id field="CompanyID">
			<Generator name="native">
				<Property name="dbType">Int32</Property>
			</Generator>
		</Id>
		<Attribute name="CarSort" type="System.String" field="CarSort" db-type="String"></Attribute>
	</Entity>
	
	<Entity type="Demo:Bakery" table="Companies" discriminator="CompanyType" discriminator-value="Demo:Bakery" copyNode="Demo:Company">
		<Id field="CompanyID">
			<Generator name="native">
				<Property name="dbType">Int32</Property>
			</Generator>
		</Id>
		<Attribute name="BakerySort" type="System.String" field="BakerySort" db-type="String"></Attribute>
	</Entity>
	
	<Entity type="Demo:SoftwareEditor" table="Companies" discriminator="CompanyType" discriminator-value="Demo:SoftwareEditor" copyNode="Demo:Company">
		<Id field="CompanyID">
			<Generator name="native">
				<Property name="dbType">Int32</Property>
			</Generator>
		</Id>
		<Attribute name="SoftwareSort" type="System.String" field="SoftwareSort" db-type="String"></Attribute>
	</Entity>

</Mapping>
